3.604 \(\int \frac{-1+2 x^2}{\sqrt{-1+x} \sqrt{1+x}} \, dx\)

Optimal. Leaf size=16 \[ \sqrt{x-1} x \sqrt{x+1} \]

[Out]

Sqrt[-1 + x]*x*Sqrt[1 + x]

________________________________________________________________________________________

Rubi [A]  time = 0.0091387, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.045, Rules used = {384} \[ \sqrt{x-1} x \sqrt{x+1} \]

Antiderivative was successfully verified.

[In]

Int[(-1 + 2*x^2)/(Sqrt[-1 + x]*Sqrt[1 + x]),x]

[Out]

Sqrt[-1 + x]*x*Sqrt[1 + x]

Rule 384

Int[((a1_) + (b1_.)*(x_)^(non2_.))^(p_.)*((a2_) + (b2_.)*(x_)^(non2_.))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symb
ol] :> Simp[(c*x*(a1 + b1*x^(n/2))^(p + 1)*(a2 + b2*x^(n/2))^(p + 1))/(a1*a2), x] /; FreeQ[{a1, b1, a2, b2, c,
 d, n, p}, x] && EqQ[non2, n/2] && EqQ[a2*b1 + a1*b2, 0] && EqQ[a1*a2*d - b1*b2*c*(n*(p + 1) + 1), 0]

Rubi steps

\begin{align*} \int \frac{-1+2 x^2}{\sqrt{-1+x} \sqrt{1+x}} \, dx &=\sqrt{-1+x} x \sqrt{1+x}\\ \end{align*}

Mathematica [C]  time = 0.0913363, size = 66, normalized size = 4.12 \[ \frac{\sqrt{x-1} \left (x \sqrt{1-x^2}-2 \sin ^{-1}\left (\frac{\sqrt{1-x}}{\sqrt{2}}\right )\right )}{\sqrt{1-x}}+2 \tanh ^{-1}\left (\sqrt{\frac{x-1}{x+1}}\right ) \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(-1 + 2*x^2)/(Sqrt[-1 + x]*Sqrt[1 + x]),x]

[Out]

(Sqrt[-1 + x]*(x*Sqrt[1 - x^2] - 2*ArcSin[Sqrt[1 - x]/Sqrt[2]]))/Sqrt[1 - x] + 2*ArcTanh[Sqrt[(-1 + x)/(1 + x)
]]

________________________________________________________________________________________

Maple [A]  time = 0.042, size = 13, normalized size = 0.8 \begin{align*} x\sqrt{-1+x}\sqrt{1+x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^2-1)/(-1+x)^(1/2)/(1+x)^(1/2),x)

[Out]

x*(-1+x)^(1/2)*(1+x)^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 0.965673, size = 12, normalized size = 0.75 \begin{align*} \sqrt{x^{2} - 1} x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-1)/(-1+x)^(1/2)/(1+x)^(1/2),x, algorithm="maxima")

[Out]

sqrt(x^2 - 1)*x

________________________________________________________________________________________

Fricas [A]  time = 1.67343, size = 36, normalized size = 2.25 \begin{align*} \sqrt{x + 1} \sqrt{x - 1} x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-1)/(-1+x)^(1/2)/(1+x)^(1/2),x, algorithm="fricas")

[Out]

sqrt(x + 1)*sqrt(x - 1)*x

________________________________________________________________________________________

Sympy [C]  time = 12.5668, size = 129, normalized size = 8.06 \begin{align*} - \begin{cases} 2 \operatorname{acosh}{\left (\frac{\sqrt{2} \sqrt{x + 1}}{2} \right )} & \text{for}\: \frac{\left |{x + 1}\right |}{2} > 1 \\- 2 i \operatorname{asin}{\left (\frac{\sqrt{2} \sqrt{x + 1}}{2} \right )} & \text{otherwise} \end{cases} + \frac{{G_{6, 6}^{6, 2}\left (\begin{matrix} - \frac{3}{4}, - \frac{1}{4} & - \frac{1}{2}, - \frac{1}{2}, 0, 1 \\-1, - \frac{3}{4}, - \frac{1}{2}, - \frac{1}{4}, 0, 0 & \end{matrix} \middle |{\frac{1}{x^{2}}} \right )}}{2 \pi ^{\frac{3}{2}}} - \frac{i{G_{6, 6}^{2, 6}\left (\begin{matrix} - \frac{3}{2}, - \frac{5}{4}, -1, - \frac{3}{4}, - \frac{1}{2}, 1 & \\- \frac{5}{4}, - \frac{3}{4} & - \frac{3}{2}, -1, -1, 0 \end{matrix} \middle |{\frac{e^{2 i \pi }}{x^{2}}} \right )}}{2 \pi ^{\frac{3}{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x**2-1)/(-1+x)**(1/2)/(1+x)**(1/2),x)

[Out]

-Piecewise((2*acosh(sqrt(2)*sqrt(x + 1)/2), Abs(x + 1)/2 > 1), (-2*I*asin(sqrt(2)*sqrt(x + 1)/2), True)) + mei
jerg(((-3/4, -1/4), (-1/2, -1/2, 0, 1)), ((-1, -3/4, -1/2, -1/4, 0, 0), ()), x**(-2))/(2*pi**(3/2)) - I*meijer
g(((-3/2, -5/4, -1, -3/4, -1/2, 1), ()), ((-5/4, -3/4), (-3/2, -1, -1, 0)), exp_polar(2*I*pi)/x**2)/(2*pi**(3/
2))

________________________________________________________________________________________

Giac [A]  time = 1.16967, size = 16, normalized size = 1. \begin{align*} \sqrt{x + 1} \sqrt{x - 1} x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-1)/(-1+x)^(1/2)/(1+x)^(1/2),x, algorithm="giac")

[Out]

sqrt(x + 1)*sqrt(x - 1)*x